<template>
  <div class="createCenter">
    <h1>{{ centerTitle }}</h1>
    <el-icon @click="handleClose" class="icon-close"><CloseBold /></el-icon>
    <div class="download-title">待下载稿件: 09篇</div>
    <div class="tips">
      60天后(自确认接收时刻起), 您的稿件将从平台服务器上移除.
    </div>
    <div class="content-list">
      <div class="list-item" v-for="item in downLoadList" :key="item.taskId">
        <div class="first-line">
          <div class="down-info">
            <div class="down-info-item">
              <div class="title">任务ID</div>
              <div class="value">{{ item.taskId }}</div>
            </div>
            <div class="down-info-item">
              <div class="title">收稿时间</div>
              <div class="value">{{ item.time }}</div>
            </div>
            <div class="down-info-item">
              <div class="title">稿件</div>
              <div class="value">
                {{ item.num }}<span class="unit">篇</span>
              </div>
            </div>
          </div>
          <img
            src="@/assets/image/mobile/mine/mobileDownload.png"
            style="width: 100px;height: 32px;"
          />
        </div>
        <div class="down-load-box">
          <img
            src="@/assets/image/mine/icon／manuscript／black@2x.png"
            style="width: 16px; height: 16px;"
          />
          <div class="manuscript-name">
            {{ (item.keyword || "").slice(0, 20) }}-{{ item.time }}
          </div>
          <div>等共计{{ item.num }}个稿件</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { Clock, CloseBold } from "@element-plus/icons-vue";
const centerTitle = ref("下载中心");
const emits = defineEmits(["close"]);
const downLoadList = ref([
  {
    taskId: "W202478120",
    time: "2022.01.01",
    num: 3,
    title: "测试稿件1",
    keyword: "测试关键词1测试关键词1测试关键词1测试关键词1测试关键词1",
  },
  {
    taskId: "W202478121",
    time: "2022.01.01",
    num: 3,
    title: "测试稿件1",
    keyword: "测试关键词1",
  },
  {
    taskId: "W202478122",
    time: "2022.01.01",
    num: 3,
    title: "测试稿件1",
    keyword: "测试关键词1",
  },
  {
    taskId: "W202478121",
    time: "2022.01.01",
    num: 3,
    title: "测试稿件1",
    keyword: "测试关键词1",
  },
  {
    taskId: "W202478122",
    time: "2022.01.01",
    num: 3,
    title: "测试稿件1",
    keyword: "测试关键词1",
  },
  {
    taskId: "W202478121",
    time: "2022.01.01",
    num: 3,
    title: "测试稿件1",
    keyword: "测试关键词1",
  },
  {
    taskId: "W202478122",
    time: "2022.01.01",
    num: 3,
    title: "测试稿件1",
    keyword: "测试关键词1",
  },
  {
    taskId: "W202478121",
    time: "2022.01.01",
    num: 3,
    title: "测试稿件1",
    keyword: "测试关键词1",
  },
  {
    taskId: "W202478122",
    time: "2022.01.01",
    num: 3,
    title: "测试稿件1",
    keyword: "测试关键词1",
  },
]);
const handleClose = () => {
  emits("close");
};
</script>

<style lang="scss" scoped>
.createCenter {
  width: 100%;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  background: #f5f5f5;
  z-index: 21;
  padding: 16px;
  box-sizing: border-box;
  .has-expired {
    background: #e6e6e6;
    color: #999999;
  }
  h1 {
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    color: #333333;
    line-height: 24px;
  }
  .icon-close {
    position: absolute;
    font-size: 24px;
    color: #333333;
    top: 16px;
    left: 16px;
  }
  .download-title {
    font-weight: bold;
    font-size: 14px;
    color: #333333;
    line-height: 14px;
    text-align: left;
    margin-top: 20px;
  }
  .tips {
    font-weight: 500;
    font-size: 12px;
    color: #ec7f20;
    margin-top: 12px;
  }
  .content-list {
    height: calc(100% - 100px);
    overflow: auto;
    .list-item {
      width: 100%;
      height: 110px;
      background: #ffffff;
      border-radius: 8px 8px 8px 8px;
      margin-top: 16px;
      padding: 16px;
      box-sizing: border-box;
      .first-line {
        display: flex;
        justify-content: space-between;
        .down-info {
          display: flex;
          .down-info-item {
            margin-right: 16px;
            .title {
              font-weight: 400;
              font-size: 10px;
              color: #b3b3b3;
            }
            .value {
              font-family: Komu A, Komu A;
              font-weight: normal;
              font-size: 14px;
              color: #666666;
              .unit {
                font-family: PingFang SC, PingFang SC;
                font-weight: 400;
                font-size: 10px;
                color: #666666;
                line-height: 10px;
              }
            }
          }
        }
      }
      .down-load-box {
        width: 100%;
        height: 34px;
        background: #f5f5f5;
        border-radius: 8px;
        display: flex;
        margin-top: 12px;
        padding: 8px;
        box-sizing: border-box;
        font-weight: 400;
font-size: 12px;
color: #333333;
        .manuscript-name {
          max-width: calc(100% - 140px);
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          margin-left: 8px;
          font-family: Microsoft YaHei UI, Microsoft YaHei UI;
font-weight: 400;
font-size: 12px;
color: #333333;
        }
      }
    }
  }
}
</style>
